<template>
  <div class="recentUpdatesItemComSubject">
    <div v-for="item in comicList" :key="item.id">
      <div class="img">
        <img :src="item.imgPath" alt="" @click="toComicInfo(item.id)" />
      </div>
      <font class="title" @click="toComicInfo(item.id)">{{ item.title }}</font>
      <font class="content">{{ item.content }}</font>
    </div>
  </div>
</template>

<script>
export default {
  name: 'RecentUpdatesItemCom',
  props: {
    comicList: {
      type: Array
    }
  },
  methods: {
    toComicInfo (value) {
      this.$router.push({
        path: '/comicInfo',
        query: {
          id: value
        }

      });
    }
  }
};
</script>

<style lang="less" scoped>
.recentUpdatesItemComSubject {
  width: 100%;
  height: 100%;
}
.recentUpdatesItemComSubject {
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
  justify-content: space-around;
  div {
    width: 170px;
    height: 180px;
    float: left;
    .img {
      width: 100%;
      height: 130px;
      overflow: hidden;
      img {
        width: 100%;
      }
    }

    .title {
      color: black !important;
      font-size: 16px;
      font-weight: bold;
    }
    .title:active {
      color: red !important;
      font-size: 16px;
      font-weight: bold;
    }
    .content {
      display: block;
      color: #a7a7a7 !important;
      font-size: 13px;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
  }
}
</style>>

